package motionControl;

import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JPanel;

public class Fenster extends JPanel {
	Color color = Color.BLUE;
	int width; 
	int height;	
	int[] vector = new int[2];
	

	public Fenster(int w, int h) {
		width = w;
		height = h;

	}

	public void paintComponent(Graphics g ) {
		g.setColor(Color.WHITE);
		g.fillRect(0, 0, width, height);
		g.setColor(Color.BLUE);
		g.fillOval(vector[0], vector[1], 20, 20);
		
		g.setColor(Color.black);
		g.drawLine(0,height/3 , 1400, height/3);
		
		g.setColor(Color.black);
		g.drawLine(0,(height/3)*2 , 1400, (height/3)*2);
		
		g.setColor(Color.black);
		g.drawLine(width/3, 0, width/3, 800  );
		
		g.setColor(Color.black);
		g.drawLine((width/3)*2, 0, (width/3)*2, 800  );
		
	}
	
	public void setPosition(HandRegistry h){
		vector[0] = h.getX();
		vector[1] = h.getY();
		
	}
}